#ifndef PORTABLE_FUNCTION_SYNTAX_KIND_H_
#define PORTABLE_FUNCTION_SYNTAX_KIND_H_

#include "src/pbc/portable-logging.h"

namespace portable {

#define FUNC_SYNTAX_KIND_LIST(V) \
  V(AnonymousExpression)         \
  V(NamedExpression)             \
  V(Declaration)                 \
  V(AccessorOrMethod)            \
  V(Wrapped)

enum class FunctionSyntaxKind : uint8_t {
#define ENUM_FIELD(NAME) k##NAME,
  FUNC_SYNTAX_KIND_LIST(ENUM_FIELD)
#undef ENUM_FIELD
};

inline const char* FunctionSyntaxKind2String(FunctionSyntaxKind kind) {
#define CASE_STMT(NAME)             \
  case FunctionSyntaxKind::k##NAME: \
    return #NAME;
  switch (kind) { FUNC_SYNTAX_KIND_LIST(CASE_STMT) }
  P_UNREACHABLE();
}

inline std::ostream& operator<<(std::ostream& os, FunctionSyntaxKind kind) {
  return os << FunctionSyntaxKind2String(kind);
}

}  // namespace portable

#endif  // PORTABLE_FUNCTION_SYNTAX_KIND_H_
